<%@page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
	<div class="row">
		<div class="col-lg-12">
			<h1 class="page-header">MyCat服务监控</h1>
		</div>
	</div>
	<!--/.row-->

	<div class="row">
		<div class="col-md-4">
			<label for="sel-mycatserver">选择MyCat Server : </label>
			<div class="input-group">
				<select id="sel-mycatserver" class="form-control" aria-describedby="basic-addon1">
				  <option>10.118.88.29</option>
				</select>
				<span class="input-group-btn">
	        		<button id="monitorMycatServerBtn" class="btn btn-primary" type="button">Go!</button>
	      		</span>
			</div>
		</div>
	</div>
	
	<div id="mycatserver-monitor-items">
	<jsp:include page="basic.jsp"></jsp:include>
	<jsp:include page="jvm.jsp"></jsp:include>

	<div class="row">
		<div class="col-lg-12">
			<h2>服务监控项</h2>
		</div>
	</div>
	
	</div>

<script type="text/javascript">

var startMycatServerMonitor = function() {
	// 移除上次的定时监控
	interval.clearAll();
	// 获取选择的mycat server
	var selVal = $('#sel-mycatserver').val();
	console.log('selected mycat server : ' + selVal);
	basicMonitor.drawBasicMonitorCharts();
	jvmMonitor.drawJvmMonitorCharts();
};

$(document).ready(function() {
	
	$('#monitorMycatServerBtn').click(function() {
		startMycatServerMonitor();
	});
	
});
</script>